package org.parademo.equations.implementations;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
import java.util.Random;

public class Generate_input_set {

	/**
	 * To set the number of voters.
	 */
	public int TOTAL_VOTERS = 100;

	/**
	 * Used for generating the tokens.
	 */
	Random randomGenerator = new Random();

	public static void main(String[] args) {

		Writer output = null;
	    File file = new File("input_token_dataset.txt");
	    Generate_input_set gen = new Generate_input_set();

	    try {
			output = new BufferedWriter(new FileWriter(file));

			for (int i=0; i < gen.TOTAL_VOTERS; i++) {
				
				int x = (gen.randomGenerator.nextBoolean() ? 1:-1) * gen.randomGenerator.nextInt(6);
				System.out.println("Generated int : " + x + "\n");
				output.write(x);
			}

			output.close();

		} catch (IOException e) {

			e.printStackTrace();
		}

	}

}
